#ifndef STEP_H
#define STEP_H

#include <ed_core/global/defs.h>
#include <ed_core/global/library.h>
#include <ed_core/tests/die.h>

#include <QtCore/QVector>

namespace ed_core
{

class ProgressHandler;

/**
 * @brief The Step class is a thin wrapper around a step value that can map it to a DicePool based on RdJ p.17
 *
 */
class ED_CORE_API Step
{
  friend class EdCore; // see EdCore::init

public:
  virtual ~Step();

  /**
   * @brief Copy constructor
   */
  Step(const ed_core::Step& other);

  /**
   * @return The step's value
   */
  virtual quint32 value() const=0;

  /**
   * @brief Implicitly convert a step into its step value as an quint32
   */
  operator quint32() const;

  /**
   * @return The dice pool associated to this step as defined by the table at RdJ p.17
   */
  ed_core::DicePool pool() const;

private:
  static QVector<ed_core::DicePool> _pools;
  static void init(ed_core::ProgressHandler*);
};

} // namespace ed_core

#endif // STEP_H
